SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
--  Table structure for `main_item`
-- ----------------------------
DROP TABLE
IF EXISTS `main_item`;

CREATE TABLE `main_item` (
	`id` INT (11) NOT NULL AUTO_INCREMENT,
	`description` VARCHAR (500) DEFAULT NULL,
	`item_icon` VARCHAR (255) DEFAULT NULL,
	`name` VARCHAR (255) NOT NULL,
	`page_url` VARCHAR (255) DEFAULT NULL,
	`parent` INT (11) DEFAULT NULL,
	`type` INT (11) DEFAULT NULL,
	`ui_id` VARCHAR (255) NOT NULL,
	`authority` VARCHAR (255) DEFAULT NULL,
	PRIMARY KEY (`id`)
) ENGINE = INNODB AUTO_INCREMENT = 11 DEFAULT CHARSET = utf8;

-- ----------------------------
--  Records of `main_item`
-- ----------------------------
BEGIN
;

INSERT INTO `main_item`
VALUES
	(
		'1',
		NULL,
		'&#xe606;',
		'组织机构',
		'organizationGroup',
		'-1',
		'0',
		'organizationGroup',
		'queryOrganization'
	),
	(
		'2',
		NULL,
		'organizationIcon',
		'组织机构',
		'platform-organizationGroup-organization',
		'1',
		'1',
		'organization',
		'queryOrganization'
	),
	(
		'3',
		NULL,
		'&#xe616;',
		'角色权限',
		'roleGroup',
		'-1',
		'0',
		'roleGroup',
		'queryAuthority||queryRole'
	),
	(
		'4',
		NULL,
		'roleIcon',
		'角色管理',
		'platform-roleGroup-role',
		'3',
		'1',
		'role',
		'queryRole'
	),
	(
		'5',
		NULL,
		'authIcon',
		'权限管理',
		'platform-roleGroup-auth',
		'3',
		'1',
		'auth',
		'queryAuthority'
	),
	(
		'6',
		NULL,
		'&#xe807;',
		'子系统管理',
		'subSystemGroup',
		'-1',
		'0',
		'subSystemGroup',
		'querySubSystem'
	),
	(
		'7',
		NULL,
		'subSystemIcon',
		'子系统管理',
		'platform-subSystemGroup-subSystem',
		'6',
		'1',
		'subSystem',
		'querySubSystem'
	),
	(
		'8',
		NULL,
		'&#xe60a;',
		'用户管理',
		'userGroup',
		'-1',
		'0',
		'userGroup',
		'queryUser'
	),
	(
		'9',
		NULL,
		'userIcon',
		'用户管理',
		'platform-userGroup-user',
		'8',
		'1',
		'user',
		'queryUser'
	),
	(
		'10',
		NULL,
		'ssUserIcon',
		'子系统用户管理',
		'platform-userGroup-ssuser',
		'8',
		'1',
		'ssUser',
		'queryUser'
	);

COMMIT;


-- ----------------------------
--  Table structure for `organization`
-- ----------------------------
DROP TABLE IF EXISTS `organization`;
CREATE TABLE `organization` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(500) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `code` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `organization`
-- ----------------------------
BEGIN;
INSERT INTO `organization` VALUES ('1', '根机构', '根机构', '-1', '000');
COMMIT;